<template>
	<div class="w750" :class="themes.theme">
		<div class="d-flex flex-column a-center h-100 mt-6">
			<div class="image-box"><img style="width: 60px; height: 60px;" src="../../assets/images/success.png" alt="" /></div>
			<div class="mt-2 mb-1">上架成功</div>
			<div class="flex-between text-fff font-14">
				<div class="text-center text-wrap mr-05p bg-fff text-333" style="border-radius: 12px; padding: 8px 22px;" @click="goback">确认并返回</div>
				<div class="text-center text-wrap" style="border-radius: 12px; padding: 8px 22px;" :style="{ background: themes.color }" @click="toPage('goodsDetail', {goodsInfoId: goodsInfoId})">前往购买</div>
			</div>
		</div>
	</div>
</template>

<script>
import { mapState } from 'vuex';
import { getProdList } from 'api/my';

export default {
	components: {
	},
	data() {
		return {
			goodsInfoId: ''
		};
	},
	computed: {
		...mapState(['themes'])
		// isShowButton() {
		// 	if(this.$utils.test.isEmpty(this.$refs.parentDiv)) return false
		// 	for(let item of this.$refs.parentDiv.children) {
		// 		console.log(item.offsetWidth, 111)
		// 	}
		// 	return false
		// 	// this.$refs.parentDiv.children.map( => {

		// 	// })
		// 	// if(document.documentElement.clientWidth)
		// }
	},
	mounted() {
		let that = this;

		//获取历史搜索

		if (this.$utils.test.isEmpty(this.themes)) {
			this.getData();
		}
		this.goodsInfoId = this.$route.query.goodsInfoId
	},
	methods: {
		// 获取装修楼层数据
		async getData() {
			// await this.$store.dispatch('getBaseSetting')
			// console.log(this.themes, 666666)
			// this._applyStyle()
			this.$store
				.dispatch('getBaseSetting')
				.then(res => {
					if (res) {
						// this._applyStyle();
						// console.log(this.floorArr)
					}
				})
				.catch(err => {
					console.log(err);
				});
		},
		goback() {
			this.$router.back();
		},
		toPage(name, query) {
			this.$router.push({
				name,
				query
			})
		},
	}
};
</script>

<style src="@/assets/css/tranferPage.css" scoped></style>
<style scoped>
</style>
